package com.order.service.impl;

import com.order.dao.DishType;
import com.order.mapper.DishTypeMapper;
import com.order.service.DishTypeservice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DishTypeServiceImpl implements DishTypeservice {

    @Resource
    private DishTypeMapper dishTypemapper;
    @Override
    public int addDishType(DishType dishType) {
        return dishTypemapper.addDishType(dishType);
    }

    @Override
    public int deleteDishType(int id) {
        return dishTypemapper.deleteDishType(id);
    }

    @Override
    public int changeDishType(DishType dishType) {
        return dishTypemapper.updateDishType(dishType);
    }

    @Override
    public List<DishType> selectDishType(DishType dishType) {
        return dishTypemapper.getDishTypes(dishType);
    }

    @Override
    public int judgment(String name) {
        return dishTypemapper.judgment(name);
    }

    @Override
    public List<DishType> getAllDishTypes(){
        return dishTypemapper.getAllDishTypes();
    }
}
